package sch.frog.behavioral.chain;

public class ChainDemo {

    public static void main(String[] args){
        IHandler handlerA = new HandlerA();
        IHandler handlerB = new HandlerB();
        IHandler handlerC = new HandlerC();

        handlerA.setNext(handlerB);
        handlerB.setNext(handlerC);

        handlerA.doIt(14);
        handlerA.doIt(65);
        handlerA.doIt(89);
    }

}
